<?php
	session_start();
	class connectDB
	{
		public function connect($host, $user, $password, $database)
		{
			mysql_connect($host, $user, $password) or die ("Problem with database connection! ".mysql_error());
			
			mysql_select_db($database);
		}		
	}
	class workDB
	{
		public $result;
		public function query ($query)
		{
			$this->result=mysql_query ("$query");
		}
	}
	
	$object=new connectDB();
	$object->connect("localhost", "root", "", "ads");

?>